﻿using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using YesBlog.Framework.Entity;

namespace YesBlog.Domain.Entity
{

    /// <summary>
    /// 用户表
    /// </summary>
    [Table("User")]
    public class UserEntity : EntityBase
    {
        /// <summary>
        /// 用户名
        /// </summary>
        [StringLength(50)]
        public string UserName { get; set; }

        /// <summary>
        /// 邮箱
        /// </summary>
        [StringLength(50)]
        public string Email { get; set; }

        /// <summary>
        /// 密码
        /// </summary>
        [StringLength(32)]
        public string Password { get; set; }

        /// <summary>
        /// 系统用户
        /// </summary>
        public bool IsSystem { get; set; }

        /// <summary>
        /// 昵称
        /// </summary>
        [StringLength(20)]
        public string NickName { get; set; }

        /// <summary>
        /// 注册时间
        /// </summary>
        public DateTime? RegDate { get; set; }

        /// <summary>
        /// 个人网站
        /// </summary>
        [StringLength(50)]
        public string Url { get; set; }

        /// <summary>
        /// 用户状态
        /// </summary>
        public int Status { get; set; }
    }
}
